/*
 * Before compilation and execution, understand what could be the output of the program.
 * Program demostrates what happen when function return type is pointer and function returning an address of local pointer.
 */

#include <stdio.h>

float *
multiply(int ii, float ff)
{
	float product;

	product = ii * ff;
	printf("product = %f address of product = %u\n", product, &product);

	return (&product);
}

int main()
{
	int i = 3;
	float f = 3.50, *prod;
	float * multiply (int, float);

	prod = multiply(i, f);
	printf("prod = %u value at address = %f\n", prod, *prod);

	return 0;
}
